package dk.dtu.is.model.settings;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * It represents the settings for this client
 * Methods to load the settings from an XML file are also provided (see JAXB)
 * 
 * In future releases, this class could be adapted to take full advantages of
 * http://docs.oracle.com/javase/6/docs/api/java/util/prefs/Preferences.html
 * 
 * @author dsac
 *
 */
@XmlRootElement(name="ClientSettings")
public class ClientSettings {

	private boolean useFakeServer;
	private String localXmlResponseFileName;

    @XmlElement(name="UseFakeServer")
	public boolean getUseFakeServer() {
		return this.useFakeServer;
	}
	public void setUseFakeServer(boolean useFakeServer) {
		this.useFakeServer = useFakeServer;
	}
	
    @XmlElement(name="LocalXmlResponseFileName")
	public String getLocalXmlResponseFileName() {
		return localXmlResponseFileName;
	}
	public void setLocalXmlResponseFileName(String localXmlResponseFileName) {
		this.localXmlResponseFileName = localXmlResponseFileName;
	}
		
	
    @Override
    public String toString() {
        return "ClientSettings ["
            + ("FakeServer=" + useFakeServer + ", ")
            + (localXmlResponseFileName!= null ? "LocalXmlResponseFileName=" + localXmlResponseFileName: "") + "]";
    }
	
}

